package com.yhally.seata.order.feign;

import com.yhally.seata.common.domain.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;
/**
 *
 * @author wangyu
 * @version 1.0
 * @date 2022/5/6 23:00
 */
@FeignClient(value = "seata-account")
@RequestMapping("/account")
public interface AccountService {

    @PostMapping("/decrease")
    CommonResult decrease(@RequestParam("userId") Long userId,
                          @RequestParam("money") BigDecimal money);

}
